<extend name="public:base" />
<block name="breadcrumb">
    <ul class="breadcrumb">
        <li>
            <i class="ace-icon fa fa-book"></i>
            <a href="index">{:L('系统管理')}</a>
        </li>
        <li class="active">{:L('用户权限')}</li>
    </ul>
</block>
<block name="c-block">
    <div class="main-content">
            <!-- #section:settings.box -->

            <!-- /.ace-settings-container -->

            <!-- /section:settings.box -->
            <div class="page-content-area">

                <div class="page-header">
                    <h1>
                        用户管理            <small>
                        <i class="ace-icon fa fa-angle-double-right"></i>
                        用户列表            </small>
                        <!-- <ul class="nav navbar-nav navbar-right">
                            <button class="btn btn-sm btn-primary" onclick="openDialog('{:U('staffAdd')}', '新增用户');">
                                <i class="fa fa-plus"></i> 新增用户 </button>
                        </ul> -->
                    </h1>
                </div>

                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->

                        <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                            <thead>
                            <tr>
                                <th>ID</th>
                                <th>昵称</th>
                                <th>用户名</th>
                                <th>用户角色</th>
                                <th>用户邮箱</th>
                                <th>用户电话</th>
                                <th>二维码</th>
                                <th>创建时间</th>
                                <th class="text-right">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <volist name="lists" id="vo" empty="暂没相关数据">
                                <tr id="id_{$vo.id}">
                                    <td>{$vo['id']}</td>
                                    <td >{$vo['nickname']}</td>
                                    <td >{$vo['username']}</td>
                                    <td>
                                        <switch $vo.type>
                                            <case 1>家长</case>
                                            <case 2>学生</case>
                                        </switch>
                                    </td>
                                    <td >{$vo['email']}</td>
                                    <td >{$vo['tel']}</td>
                                    <td ><img src="__PUBLIC__/uploads/{$vo['user_qrcode']}" alt="" /></td>
                                    <td >{$vo['add_time']|date="Y-m-d H:i",###}</td>
                                    <td class="text-right">
                                        <button class="btn btn-xs btn-info" onclick="openDialog('{:U('userEdit',['id'=>$vo['id']])}', '修改用户');">
                                            <i class="ace-icon fa fa-pencil bigger-120"></i>
                                        </button>
                                        <button class="btn btn-xs btn-danger delete confirm" data-rel="确定删除吗？" data-action="{:U('userDel',['id'=>$vo['id']])}">
                                            <i class="ace-icon fa fa-trash-o bigger-120"></i>
                                        </button>
                                    </td>
                                </tr>
                            </volist>
                            <tr>
                                <td colspan="9">
                                <ul class="pagination">
                                </ul>
                            </td>
                            </tr>
                            </tbody>
                        </table>
                        <!-- PAGE CONTENT ENDS -->
                    </div>
                    <!-- /.col -->
                </div>
                <!-- /.row -->
            </div>
            <!-- /.page-content-area -->
    </div>
</block>
